... Oostrum11
A considerable part of this article was written by George Grätzer (University of Manitoba) in Notices Amer. Math. Soc. Thanks, George!
... commands22
There are similar commands for paragraph and subparagraph but they are seldom used.
... solved33
This is a simplification of the actual code. Get the real package from the CTAN sites.
...344
The multicol package uses a similar technique.
... preamble55
If you have fancyheadings version 1.5 or higher the commands described in this section are already included
... work66
It was probably a dumb decision to define the width parameters as lengths. There is no need to and I may change this in a future version of fancyheadings
... trickery77
If you have a recent version of the ifthen package the tricks are not necessary. You can then test the \pageref{LastPage} directly.
... situation88
After I made this package I discovered a package secret.sty that does a similar thing to mark confidential paragraphs if they cross a page boundary. It does it, however, by changing the output routine.
... work99
Actually there is another way but it requires two passes: you can put \label commands before and after the text and compare the \pagerefs.